import { RouteMap } from '@/typings/router'
import { PageNames } from '@/router/routes/pagenames'

const Pages: Record<string, RouteMap> = {
    [PageNames.USER_MGR]: {
        component: () => import('@/views/_builtin/management/user/index.vue')
    },
    [PageNames.DEPT_MGR]: {
        component: () => import('@/views/_builtin/management/department/index.vue')
    },
    [PageNames.POST_MGR]: {
        component: () => import('@/views/_builtin/management/post/index.vue')
    },
    [PageNames.ROLE_MGR]: {
        component: () => import('@/views/_builtin/management/role/index.vue')
    },
    [PageNames.PERMISSION_MGR]: {
        component: () => import('@/views/_builtin/management/permission/index.vue')
    },

    [PageNames.DICTIONARY_MGR]: {
        component: () => import('@/views/_builtin/management/dictionary/data/index.vue')
    },
    [PageNames.GLOBAL_CONFIG_MGR]: {
        component: () => import('@/views/_builtin/management/dictionary/global/index.vue')
    },
    [PageNames.SYSNOTICE_MGR]: {
        component: () => import('@/views/_builtin/management/sys-notice/index.vue')
    },
    [PageNames.QINIU_MGR]: {
        component: () => import('@/views/_builtin/management/qiniu/account/index.vue')
    },
    [PageNames.QINIU_BUCKET_MGR]: {
        component: () => import('@/views/_builtin/management/qiniu/bucket/index.vue')
    },
    [PageNames.SENSITIVEWORD_MGR]: {
        component: () => import('@/views/_builtin/management/sensitive/index.vue')
    },
    [PageNames.SERVER_MONITOR]: {
        component: () => import('@/views/_builtin/monitor/servermonitor/index.vue')
    },
    [PageNames.SYSNOTICE_PUBLISH]: {
        path: '/admin/sysnotice/public',
        component: () => import('@/views/_builtin/management/sys-notice/publish.vue'),
        meta: {
            title: '通知',
            icon: 'ant-design:sound-outlined',
            autoMount: true,
            auth: PageNames.SYSNOTICE_MGR
        }
    }
}

export default Pages
